home *** CD-ROM | disk | FTP | other *** search
/ Apple II Magazines (PO) / Bits and Bytes Volume 11, No. 05 (1989-11)(Apple Computing Enjoyment Society)(Side A).zip / Bits and Bytes Volume 11, No. 05 (1989-11)(Apple Computing Enjoyment Society)(Side A).po / ARTICLES / BEAGLE.COMPILER.txt < prev    next >
Text File  |  1996-12-24  |  6KB  |  111 lines

  1.                      THE BEAGLE COMPILER
  2.  
  3.               By Phil Shapiro, from E.A.C. EXPRESS
  4.  
  5. Applesoft BASIC is one of the most popular programming languages for
  6. the Apple II family.  It's easy to learn, flexible to use, and
  7. compatible with every Apple II computer ever sold.  Applesoft is built
  8. into every Apple II computer since the antique Apple II+, so it's
  9. immediately accessible to everyone.  Even the "original" Apple II's,
  10. from circa 1978, can run Applesoft BASIC programs (when installed with
  11. an Applesoft BASIC LANGUAGE BOARD).
  12.  
  13. Although the acronym BASIC stands for "Beginner's All-Purpose Symbolic
  14. Instructional Code," Applesoft BASIC is used by more than a few
  15. professional programmers.  And Applesoft is by far the most popular
  16. programming language for amateur Apple II programmers. You need only
  17. look at the mounds of public domain programs written in Applesoft to
  18. appreciate the great flexibility of the language.
  19.  
  20. But Applesoft does have one important limitation: sometimes it can be
  21. as slow as a snail with two broken legs.  The reason for Applesoft
  22. being slow is that it's an interpreted language.  Each time you run an
  23. Applesoft program, your Apple II has to translate each line of code
  24. into instructions that are intelligible to the CPU.
  25.  
  26. In many programs, this translation process does not slow the program
  27. down appreciably.  After all, your Apple II can carry out hundreds of
  28. instructions in one second.  But in other programs the translation of
  29. Applesoft lines into lower-level "machine language" code slows the
  30. program down to an unacceptable crawl.
  31.  
  32. "What to do?" you sigh impatiently.  Never fear, Beagle Bros to the
  33. rescue.  Beagle Bros is a company that built its reputation by selling
  34. extraordinarily useful software tools to Apple II programmers. (These
  35. days Beagle Bros has shifted their marketing emphasis to the sale of
  36. AppleWorks enhancements.)  Back in 1986, Beagle Bros released their
  37. latest programming tool, the Beagle compiler.
  38.  
  39. The Beagle Compiler is a program that translates your Applesoft
  40. program into low-level "machine code" before the program is run.
  41. Then, when you run your "compiled" program, the program zips along
  42. from anywhere between two to fifteen times faster than it did before.
  43. All of a sudden, Applesoft BASIC is not only easy to learn and
  44. flexible to use; these days good old Applesoft is fast and powerful
  45. too.
  46.  
  47. To be honest, the Beagle Compiler is not a panacea for all Applesoft
  48. woes.  Some Applesoft programs are not speeded up much by being
  49. compiled.  Programs that make heavy use of the random function (RND)
  50. or the trig functions (SIN, COS, and TAN) do not run at lightning
  51. speed.  And some Applesoft programs are just not useable when running
  52. at a superfast speed.
  53.  
  54. But your average Applesoft program that seems a little weary and
  55. fatigued in normal operation, will benefit splendidly by being
  56. compiled.  In the few seconds it takes for the Beagle Compiler to work
  57. it's magic, your program will regain that youthful bounce in its step.
  58.  
  59. "So how do you go about using the Beagle Compiler?" you might ask.
  60. Well, the best thing about this compiler is its ease of use.  You
  61. don't need a PhD in computer science to use it.  Even beginning
  62. programmers could learn how to use it.
  63.  
  64. Having just said the above, it behooves me to add that to get the most
  65. out of this compiler, you really ought to have a solid familiarity
  66. with Applesoft BASIC and the ProDos operating system.  You can use the
  67. compiler easily if you have simple programs to compile.  But if your
  68. programs are long and/or complicated, you'll have to study up a bit to
  69. make use of the advanced features of the compiler.
  70.  
  71. The documentation that accompanies the Beagle Compiler is concise,
  72. informative, and complete.  Used in conjunction with the demonstration
  73. programs on the disk itself, the documentation does an exemplary job
  74. of explaining what you need to do to use the compiler.  Basically, all
  75. you need to do is: 1) Boot the Beagle Compiler disk, 2) Take the disk
  76. out of your disk drive, 3) Put your own ProDos based Applesoft disk in
  77. the drive, and 4) Type RUN followed by the name of the program you
  78. want to run at compiled speed.
  79.  
  80. Your disk drive will then whirr, the compiler will take about five to
  81. ten seconds to "do-its-thing," and very soon your program will be off
  82. and running at machine language speed.  Easy enough for a second
  83. grader, come to think of it.
  84.  
  85. If you are a throroughly devoted speed demon, the Beagle Compiler also
  86. allows you to compile your Applesoft programs to disk.  The compiler
  87. can actually translatge your program into pseudo machine-language
  88. code, and then save that code to disk.  To do this, just type the
  89. command COMPILE, followedd by the name of the program you want
  90. compiled, and the name you want the ensuing compiled program to be
  91. saved as.
  92.  
  93. Once a program is compiled to disk, you can run it at the fast speed
  94. without even waiting the usual five to ten seconds for the compiler to
  95. translate your code.  Pretty darn nifty, don't you think?
  96.  
  97. The Beagle Compiler opens up whole new programming possibilities for
  98. creative Applesoft aficianados.  Gone are the nagging speed limits of
  99. old.  Combined with the new Zip Chip speedy CPU's, and the fast CPU's
  100. of the Apple IIGS and IIc+, Applesoft BASIC is sure to enjoy a
  101. resurgence among amateurs and professionals alike.
  102.  
  103. The Beagle Compiler runs on all Apple II's from the II+ to the IIc+.
  104. In the great Beagle Bros tradition, the disk is not copy-protected.
  105. It sells for about $46, mail order.  A big thanks is owed to Alan
  106. Bird, the inspired creator of the Beagle Compiler program.
  107.  
  108.  
  109.  
  110.  
  111.